local skel = fk.CreateSkill{
  name = "fm__dimeng_viewas&",
}
Fk:loadTranslationTable{
  ["fm__dimeng_viewas&"] = "缔盟",
  [":fm__dimeng_viewas&"] = "你可以于出牌阶段使用缔盟角色的手牌。",
}
---@type ViewAsSkillSpec
local dimeng_viewas = {
  mute = true,
  expand_pile = function (self, player)
    if player:getMark("fm__dimeng") ~= 0 then
      return Fk:currentRoom():getPlayerById(player:getMark("fm__dimeng")):getCardIds("h")
    end
    return {}
  end,
  card_filter = function (self, player, to_select, selected)
    local to = Fk:currentRoom():getPlayerById(player:getMark("fm__dimeng"))
    return #selected == 0 and table.contains(to:getCardIds("h"), to_select)
  end,
  view_as = function (self, player, cards)
    if #cards ~= 1 then return end
    local c = Fk:getCardById(cards[1])
    return c
  end,
  enabled_at_response = Util.FalseFunc
}
skel:addEffect("viewas", dimeng_viewas)
return skel